package com.bricker.laboratorymanagement.business.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
@Data
@TableName("sys_approval")
public class Approval implements Serializable {
    @TableId(type = IdType.AUTO)
    private Long id;

    private String type;

    private String state;

    private Long applyId;

    private String receiver;

    private Long groupId;

    private Long createdBy;

    private LocalDateTime createdTime;

    private Long updatedBy;

    private LocalDateTime updatedTime;

    private String delFlag;

    /**
     * 申请人姓名
     */
    @TableField(exist = false)
    private String createByName;
    /**
     * 申请实验室的小组名字
     */
    @TableField(exist = false)
    private String createByGroupName;

    /**
     * 申请加入小组名字
     */
    @TableField(exist = false)
    private String groupName;
    /**
     * 预约实验室名字
     */
    @TableField(exist = false)
    private String labName;

    /**
     * 预约起始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date serveStartTime;

    /**
     * 预约结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date serveEndTime;

    private static final long serialVersionUID = 1L;
}
